import 'package:flutter/widgets.dart';
import 'package:full_display/page/medium/cell_widgets/item_media.dart';
import 'package:full_display/unit/screen/screen_utility.dart';

class ProductWidget extends StatelessWidget {
  final List<String> dataList;

  const ProductWidget({Key? key, required this.dataList}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
        margin: EdgeInsets.only(top: 24.0.H),
        child: GridView.builder(
          padding: EdgeInsets.only(
            left: 20.0.W,
            right: 20.0.W,
          ),
          itemCount: dataList.length,
          gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
              childAspectRatio: 104 / 130,
              crossAxisCount: 3,
              crossAxisSpacing: 12.0.W,
              mainAxisSpacing: 12.0.H),
          itemBuilder: (context, index) {
            return ItemMedia(
              bottomTitle: dataList[index],
            );
          },
        ));
  }
}
